/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package recitation;

import javax.swing.*;
import java.awt.*;

/**
 *
 * @author buer
 */
public class ImagePanel extends JPanel {
    public ImagePanel(Image img) {
        this.img = img;
        Dimension size = new Dimension(img.getWidth(null),
                img.getHeight(null));
        setSize(size);
        setPreferredSize(size);
        setMinimumSize(size);
        setMaximumSize(size);
        setLayout(null);
    }
    @Override
    public void paintComponent(Graphics g) {
        g.drawImage(img, 0, 0, null);
    }
    private Image img;
}
